Design and implementation of aggregate functions in the DLV system

نویسندگان

  • Wolfgang Faber
  • Gerald Pfeifer
  • Nicola Leone
  • Tina Dell'Armi
  • Giuseppe Ielpa
چکیده

Disjunctive Logic Programming (DLP) is a very expressive formalism: it allows for expressing every property of finite structures that is decidable in the complexity class Σ2(=NP ). Despite this high expressiveness, there are some simple properties, often arising in real-world applications, which cannot be encoded in a simple and natural manner. Especially properties that require the use of arithmetic operators (like sum, times, or count) on a set or multiset of elements, which satisfy some conditions, cannot be naturally expressed in classic DLP. To overcome this deficiency, we extend DLP by aggregate functions in a conservative way. In particular, we avoid the introduction of constructs with disputed semantics, by requiring aggregates to be stratified. We formally define the semantics of the extended language (called DLP), and illustrate how it can be profitably used for representing knowledge. Furthermore, we analyze the computational complexity of DLP, showing that the addition of aggregates does not bring a higher cost in that respect. Finally, we provide an implementation of DLP in DLV– a state-of-the-art DLP system – and report on experiments which confirm the usefulness of the proposed extension also for the efficiency of computation.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Aggregate Functions in DLV

Disjunctive Logic Programming (DLP) is a very expressive formalism: it allows for expressing every property of finite structures that is decidable in the complexity class . Despite this high expressiveness, there are some simple properties, often arising in real-world applications, which cannot be encoded in a simple and natural manner. Especially properties that require the use of arithmetic o...

متن کامل

Efficient Evaluation of Disjunctive Datalog Queries with Aggregate Functions

We present a technique for the optimization of (partially) bound queries over disjunctive datalog programs enriched with aggregate functions (Datalog∨A programs). This class of programs has been recently proved to be well-suited for declaratively formalizing repair semantics in data integration systems. Indeed, even though disjunctive programs provide a natural way for encoding the possible rep...

متن کامل

Aggregate Functions in Disjunctive Logic Programming: Semantics, Complexity, and Implementation in DLV

Disjunctive Logic Programming (DLP) is a very expressive formalism: it allows to express every property of finite structures that is decidable in the complexity class E^ (NP H ) . Despite the high expressiveness of DLP, there are some simple properties, often arising in real-world applications, which cannot be encoded in a simple and natural manner. Among these, properties requiring to apply so...

متن کامل

Optimizing Repair Programs and their Evaluation for Consistent Query Answering in Databases

Databases may not satisfy integrity constraints (ICs) for several reasons. Nevertheless, in most of the cases an important part of the data is still consistent wrt certain desired ICs, and the database can still give some correct answers to queries wrt those ICs. Consistent query answers are characterized as ordinary answers obtained from every minimally repaired and consistent version of the d...

متن کامل

Well-Founded Semantics for Logic Programs with Aggregates: Implementation and Experimentation

Aggregate constructs are one of the major linguistic extensions to logic programming. In this paper, we focus on logic programming with monotone and antimonotone aggregate literals with the well-founded semantics defined in [1], which allows for aggregates occurring in recursive definitions. We formally show that computing this semantics is tractable and present a prototype system obtained by m...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • TPLP

دوره 8  شماره 

صفحات  -

تاریخ انتشار 2008